<?php get_header(); ?>

<!-- main body of #main -->

<div id="main" role="main">
    <section class="container">
        <div class="content-abroad">
            <ul>
                <li>
                    <ul class="title">
                        <li style="color: #42d0f5; text-transform: uppercase;">
                            <?php $term = get_term_by( 'slug', 'chuc-mung-visa', 'photocategories' ); echo $term->name; ?>
                        </li>
                    </ul>
                </li>
                <li class="content-abroad-body">
                    <div id="welcome-visa" class="entry-content flexslider" style="padding: 0 20px; border: none;">
                        <ul class="photo-row group slides" style="border: none;">
                            <?php
                                $args = array(
                                            'posts_per_page' => 8,
                                            'post_type' => 'photo',
                                            'taxonomy' => 'photocategories',
                                            'term' => 'chuc-mung-visa'
                                    );
                                
                                $photo_query = new WP_Query($args);
                            ?>
                            <?php if($photo_query->have_posts()) : ?>
                            <?php while($photo_query->have_posts()) : $photo_query->the_post() ?>
                            <li>
                                <?php $images = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); ?>
                                <a href="<?php echo $images[0]; ?>" class="fancybox" rel="group-chuc-mung-visa" title="<?php the_title(); ?>">
                                <?php the_post_thumbnail( 'psize' ); ?>
                                </a>
                                <h4 style="text-align: center;">
                                    <?php the_title(); ?>
                                </h4>
                            </li>
                            <?php endwhile; ?>
                            <?php endif; ?>
                            <?php wp_reset_query(); ?>
                        </ul>
                    </div>
                </li>
            </ul>
        </div>
        <!--end content--> 
    </section>
    <section class="container" style="margin-top: 20px;">
        <div class="content-abroad">
            <ul>
                <li>
                    <ul class="title">
                        <li style="color: #ffc22f; text-transform: uppercase;">
                            <?php $term = get_term_by( 'slug', 'cuoc-song-du-hoc-sinh', 'photocategories' ); echo $term->name; ?>
                        </li>
                    </ul>
                </li>
                <li class="content-abroad-body">
                    <div class="entry-content" style=" border: none; text-align: center;">
                        <ul class="photo-no-slide group" style="border: none; text-align: center;">
                            <?php
							$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
							$args = array(
										'posts_per_page' => get_option('post_per_page'),
										'post_type' => 'photo',
										'taxonomy' => 'photocategories',
										'term' => 'cuoc-song-du-hoc-sinh',
										'paged' => $paged
								);
							
							$photo_query = new WP_Query($args);
						?>
                            <?php if($photo_query->have_posts()) : ?>
                            <?php while($photo_query->have_posts()) : $photo_query->the_post() ?>
                            <li>
                                <?php $images = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); ?>
                                <a href="<?php echo $images[0]; ?>" class="fancybox" rel="group-cuoc-song-du-hoc-sinh" title="<?php the_title(); ?>">
                                <?php the_post_thumbnail( 'psize' ); ?>
                                </a>
                                <h4 style="text-align: center;">
                                    <?php the_title(); ?>
                                </h4>
                            </li>
                            <?php endwhile; ?>
                            <?php endif; ?>
                        </ul>
                    </div>
                    <?php if (function_exists("pagination")) { pagination($custom_query->max_num_pages); } ?>
                    <?php wp_reset_query();?>
                    <div class="clearfix"></div>
                </li>
            </ul>
        </div>
        <!--end content--> 
    </section>
</div>
<!-- end of div#main -->

<?php get_footer(); ?>
